﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Workflow.Model
{
    [Serializable]
    public class MenuModels
    {

        //    var _menus = { "menus": [
        //                { "menuid": "1", "icon": "icon-sys", "menuname": "MSD",
        //                    "menus": [{ "menuname": "菜单管理", "icon": "icon-nav", "url": "demo.html" },
        //                            { "menuname": "添加用户", "icon": "icon-add", "url": "demo.html" },
        //                            { "menuname": "用户管理", "icon": "icon-users", "url": "demo2.html" },
        //                            { "menuname": "角色管理", "icon": "icon-role", "url": "demo2.html" },
        //                            { "menuname": "权限设置", "icon": "icon-set", "url": "demo.html" },
        //                            { "menuname": "系统日志", "icon": "icon-log", "url": "demo.html" }
        //                        ]
        //                }, { "menuid": "8", "icon": "icon-sys", "menuname": "GP",
        //                    "menus": [{ "menuname": "员工列表", "icon": "icon-nav", "url": "demo.html" },
        //                            { "menuname": "视频监控", "icon": "icon-nav", "url": "demo1.html" }
        //                        ]
        //                }, { "menuid": "56", "icon": "icon-sys", "menuname": "Report",
        //                    "menus": [{ "menuname": "添加部门", "icon": "icon-nav", "url": "demo1.html" },
        //                            { "menuname": "部门列表", "icon": "icon-nav", "url": "demo2.html" }
        //                        ]
        //                }, { "menuid": "28", "icon": "icon-sys", "menuname": "Maintain",
        //                    "menus": [{ "menuname": "User", "icon": "icon-nav", "url": "demo.html" },
        //                            { "menuname": "Dictionary", "icon": "icon-nav", "url": "demo1.html" },
        //                            { "menuname": "Email", "icon": "icon-nav", "url": "demo.html" }
        //                        ]
        //                } 
        //        ]
        //};
        public  MenuModels(string id,string name ,string url,string ico,IList<MenuModels> childmenus)
        {
            menuid = Convert.ToInt32(id);
            menuname = name;
            Url = url;
            icon = ico;
            menus = childmenus;
        }
        public MenuModels(string id, string name, string url, string ico)
        {
            menuid = Convert.ToInt32(id);
            menuname = name;
            Url = url;
            icon = ico;          
        }

        public MenuModels()
        {

        }

        public virtual int menuid { get; set; }
        public virtual string icon { get; set; }
        public virtual string menuname { get; set; }
        public virtual string Url { get; set; }

        public virtual string Roles { get; set; }

        public virtual int? ParentId { get; set; }

        public virtual IList<MenuModels> menus { get; set; }
    }
 
}